<template>
  <div>
    {{state.count}}

    <p>计数组件：</p>
    <Counter msg="Vite + Vue" />

    <p>计算属性</p>
    <Computed />
    <p>监听器</p>

    <div> <Lifecycle v-if="!isDestroy"/>
      <button @click="isDestroy = !isDestroy">点击销毁/重建【声明周期】组件</button>
    </div>
    
  </div>
  

  
</template>

<script setup lang="ts">
const state = reactive({ count: 0 }) // {count: 0}
// setInterval(() => {
//   state.count += 1
// }, 1000)
const isDestroy = ref(false)


</script>

<style>

</style>